//package com.coincalf.web;
//
//
//import com.baomidou.mybatisplus.mapper.EntityWrapper;
//import com.baomidou.mybatisplus.plugins.Page;
//import com.coincalf.entity.User;
//import com.coincalf.entity.UserLoginLog;
//import com.coincalf.service.UserLoginLogService;
//import io.swagger.annotations.*;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.security.core.annotation.AuthenticationPrincipal;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import springfox.documentation.annotations.ApiIgnore;
//
///**
// * <p>
// * 用户登录日志 前端控制器
// * </p>
// *
// * @author qiang
// * @since 2018-03-06
// */
//@RestController
//@RequestMapping("/login/history")
//@Api(value = "用户登录日志", description = "用户登录日志")
//public class UserLoginLogController {
//
//    @Autowired
//    private UserLoginLogService userLoginLogService;
//
//    /**
//     * 登录历史
//     *
//     * @param user
//     * @param page
//     * @return
//     */
//    @ApiOperation(value = "登录历史", httpMethod = "GET", authorizations = {@Authorization(value = "Authorization")})
//    @ApiResponses(value = {
//            @ApiResponse(code = 0, message = "请求成功", response = Page.class),
//    })
//    public Object list(@ApiIgnore @AuthenticationPrincipal User user, @ApiIgnore Page<UserLoginLog> page) {
//        EntityWrapper<UserLoginLog> ew = new EntityWrapper<>();
//        ew.eq("user_id", user.getId());
//        ew.orderBy("login_time", false);
//        return userLoginLogService.selectPage(page, ew);
//    }
//
//}
